#include <iostream>
#include <fstream>
#include <vector>
#include "Utils/fileHelper.h"
#include "Compiler/Lexer.h"

using namespace std;

int main() {
    string content = readFile("testfile.txt");
    std::ofstream outputFile("output.txt");

    Lexer lexer(content);

    vector<tuple<LexType, string>> tokens;
    auto token = lexer.next();
    LexType lexType = get<0>(token);
    while (lexType != LexType::LEXER_END) {
        tokens.push_back(token);
        token = lexer.next();
        lexType = get<0>(token);
    }

    for (auto t: tokens) {
        cout << get<1>(t) << endl;
    }

//    outputFile << " " << get<1>(token) << endl;
    outputFile.close();
    return 0;
}
